/**
 * Created with IntelliJ IDEA.
 * ClassName: Demo
 * Package: PACKAGE_NAME
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-12-25
 * Time: 21:31
 */

public class Demo {
    public static void main(String[] args) {


        String str = "hello word";

        System.out.println(str.substring(0, 4));

        System.out.println(str.substring(2, 4)); //不是步长 是位置

    }
}
